package com.neusoft.zqygbc.neusoft_wenda.service;

/**
 * Created by Lenovo on 2017/4/5.
 */

import com.neusoft.zqygbc.neusoft_wenda.javeBean.Status;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.Uid;
import com.neusoft.zqygbc.neusoft_wenda.javeBean.UserInfo;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;


public interface UserService {

    //登陆
    @GET("Users/login")
    Call<Uid> getLogin(
            @Query("tel") String tel,
            @Query("pwd") String pwd);

    //获取用户信息
    @GET("Users/checktel")
    Call<Status> Checktel(
            @Query("utel") String utel

    );

    //注册
    @GET("Users/regusers")
    Call<Status> register(
            @Query("username") String username,
            @Query("pwd") String password,
            @Query("tel") String tel);

    //获取用户信息
    @GET("Personal/userdata")
    Call<UserInfo> getUserById(
            @Query("uid") String user_id

    );
    //修改用户信息
    @GET("Personal/updatauserdata")
    Call<Status> updatauserdata(
            @Query("uid") String uid,
            @Query("username") String username,
            @Query("email") String email,
            @Query("sex") String sex,
            @Query("birth") String birth,
            @Query("signature") String signature,
            @Query("schoolname") String schoolname
    );

    @Multipart
    @POST("Personal/updatauserdata?uid=17")
    Call<ResponseBody> upload(
//            @Query("uid") String uid,
//            @Query("sex") String sex,
            @Part MultipartBody.Part upic
    );

    //点赞
    @GET("Personal/ThumbUp")
    Call<Status> ThumbUp(
            @Query("qid") String qid

    );

    //修改密码
    @GET("Personal/updata")
    Call<Status> updatepwd(
            @Query("uid") String uid,
            @Query("oldpass") String oldpass,
            @Query("newpass") String newpass

    );





}